/**
 * Copyright (C), 2015-2020, XXX有限公司
 * <p>
 * FileName: RespBean
 * <p>
 * Author:   Brill
 * <p>
 * Date:     2020/2/17/017 13:30
 * <p>
 * Description: 返回前端的对象
 * <p>
 * History:
 *
 * <author>          <time>          <version>          <desc>
 * <p>
 * 作者姓名           修改时间           版本号              描述
 */


package cn.yuhh.entity;


/**
 * 〈一句话功能简述〉<br>
 * 〈返回前端的对象〉
 *
 * @author Brill
 * @create 2020/2/17/017
 * @since 1.0.0
 */

public class RespBean {
    private String message;
    private Integer status;
    private Object obj;

    public static RespBean ok(String message, Object obj) {
        return new RespBean(200, message, obj);
    }

    public static RespBean ok(String message) {
        return new RespBean(200, message);
    }

    public static RespBean error(String message, Object obj) {
        return new RespBean(500, message, obj);
    }

    public static RespBean error(String message) {
        return new RespBean(500, message);
    }

    private RespBean() {
    }

    private RespBean(Integer status,String message) {
        this.message = message;
        this.status = status;
    }

    private RespBean(Integer status, String message, Object obj) {
        this.message = message;
        this.status = status;
        this.obj = obj;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getstatus() {
        return status;
    }

    public void setstatus(Integer status) {
        this.status = status;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }
}
